/*
* @@Description: 检测管理接口
*/
import xjaxios from "@/api/axios";
import zhreq from "@/api/axios";
export default {
  postDeteionNange(param) {
    return xjaxios.post("/v3/detection/detection/queryPageList", param)
  },
  queryByConditionInfo(param) {
    return xjaxios.post("/v3/detection/detection/queryByCondition",
      {
        page: param.page,
        size: param.size,
        sort: "timestamp",
        entity: {
          organizationNo: sessionStorage.organizationNo,
          createUserId: param.createUserId,
          endTime: param.endTime,
          startTime: param.startTime,
          detectionTypeId: param.detectionTypeId
        }
      })
  },
  /**
   * @description: 新增检测信息
   * @param {Object} formData *
   * @return {Object}
   */
  addDetectionManageInfo(formData) {
    return xjaxios.post("/v3/detection/detection/add", formData);
  },
  /**
   * @description: 编辑检测信息
   * @param {Object} formData *
   * @return {Object}
   */
  editDetectionManageInfo(formData) {
    return xjaxios.post("/v3/detection/detection/edit", formData);
  },
  delDetectionManageInfo(params) {
    return xjaxios.post("/v3/detection/detection/delList", { detectionNoList: params })
  },
  /**
   * @description: 批次条件查询 *代表必填
   */
  querybylist(params) {
    return zhreq.post("/v3/batch/productionBatch/queryByCondition", {
      ...params,
      organizationNo: sessionStorage.organizationNo
    });
  },
  getColectPicture(e) {
    return zhreq.get(`/v3/detection/detectionPicture/query?detectionPictureId=${e}`);
  },
  delCollectionPicture(params) {
    return zhreq.post("/v3/batch/productionBatch/queryByCondition", {
      ...params
    });
  }
}
